
FOLDER "functions": includes all the necessary function files
	l2relax0 - the l2-relax estimator by the built-in "fmincon" package
	l2relax1 - the l2-relax estimator by the "cvx" package
	l2relax_ps - the l2-relax estimator for portfolio selection (nest CV by the Sharpe ratio) 
	gec_fun - the vast portfolio selection estimator with gross-exposure constraints (GEC) by Fan et al. (2012) (require the CVX package)
	cov1para - the linear covariance shrinkage estimator written by Olivier Ledoit and Michael Wolf for their 2014 paper
	analytical_shrinkage - the nonparametric covariance shrinkage estimator written by Olivier Ledoit and Michael Wolf for their 2020 paper
	est_cv - the intermediate function that performs cross-validation for the l2-relax estimator 
	plotline - plot the weight figure for empirical exercises
	prt_tab - print matrix results into latex table format

FOLDER "simulation": includes codes to replicate simulation
	fc_simulation1 - simulation in the paper, iid case
	fc_simulation2 - simulation in the paper, time series case
	fc_simulation2a - simulation in the paper, time series case (but with conventional CV)
	fc_simulation3 - simulation in the paper, iid case+approximation
	fc_simulation_PS - simulation in the paper, portfolio selection

FOLDER "empiricals": includes codes to replicate empirical exercises
	emp1.mat - data for the box office prediction exercise
	emp2.mat - data for the inflation forecasting exercise
	emp3.mat - data for the portfolio selection exercise
	fc_emp1 - codes that replicate the box office prediction exercise
	fc_emp2 - codes that replicate the inflation forecasting exercise
	fc_emp3 - codes that replicate the portfolio selection exercise



Note: 
(a) some exercises require the CVX package. You can obtain it from http://cvxr.com/cvx/. Make sure to install it first before implementing our codes.
(b) we provide codes of the l2relax estimator by different optimization packages, denoted as l2relax0.m and l2relax1.m. l2relax0 utilizes the built-in "fmincon" package and l2relax1 uses the "cvx" package. The "cvx" package offers 4 different solvers. The free solvers "SDPT3" and "SeDuMi" are less efficient than the MATLAB built-in "fmincon". The commercial Solver "MOSEK" is (slightly) faster than "fmincon". Unless you have installed "MOSEK", we recommend using the built-in "fmincon" function for l2relax estimation.
(c) besides of the major function files provided in the "function" folder, we also composed many minor nested functions within the main script files. Feel free to modify, distribute or re-use those under other circumstances. 


